//#include <bits/stdc++.h>
#include "head.h"

using namespace std;
using ll = long long;
#define int long long

void solve()
{
    string s;
    cin >> s;
    int n = s.size();
    int index = 0;
    for (int i = 0; i < n; i++)
    {
        if (s[i] == 'W')
        {
            if (s[index] != 'W') index = i;
            continue;
        }
        else if (s[i] == 'A')
        {
            if (s[i - 1] == 'W')
            {
                s[index] = 'A';
                for (int j = index + 1; j <= i; j++) s[j] = 'C';
            }
        }
        index = i;
    }
    cout << s;
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t = 1;
    //cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}